package io.kerns.core.web.response;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 分页查询
 *
 * @author xiaohei
 * @create 2020-05-22 上午9:59
 **/
@Data
public class PageResult<T> implements Serializable {
    @ApiModelProperty(value = "返回的对象")
    private List<T> results;
    @ApiModelProperty(value = "总数据")
    private Long itemCount;
    @ApiModelProperty(value = "总页数")
    private Long totalPage;
    @ApiModelProperty(value = "当前页码")
    private Long pageIndex;
    @ApiModelProperty(value = "每页显示的条数")
    private Long pageSize;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @ApiModelProperty(value = "扩展信息")
    private Object extra;

}
